<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<%@taglib prefix="ax" uri="/WEB-INF/AlanXUpload.tld" %>
<html>
		<head>
		<ax:head/>
				<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
				<title>Login</title>
				<script type="text/javaScript" src="web/yfit.js"></script>
				<script type="text/javaScript" src="web/yfitone.js"></script>
				<script type="text/javaScript" src="web/ydnd.js"></script>
			
				<script type="text/javaScript" src="web/jquery.js"></script>
				<script type="text/javaScript" src="web/prototype.js"></script>
				<script type="text/javaScript" src="web/tween.js"></script>
				<script type="text/javaScript" src="web/yutil.js"></script>
				<script type="text/javaScript" src="web/ydate.js"></script>
				<script type="text/javaScript" src="web/ydragdrop.js"></script>
				<script type="text/javaScript" src="web/yform.js"></script>
				<script type="text/javaScript" src="web/ygrid.js"></script>
				<script type="text/javaScript" src="web/ypop.js"></script>
				<script type="text/javaScript" src="web/ytypein.js"></script>
				<script type="text/javaScript" src="web/tpmsdwc.js"></script>
				<script type="text/javaScript" src="web/scw.js"></script>
				
				<link rel="stylesheet" type="text/css" href="web/default.css" media="all" />
				<link rel="stylesheet" type="text/css" href="web/print.css" media="print" />
			
				<link rel="icon" href="tiger.gif" type="image/vnd.microsoft.icon">  
				<link rel="shortcut icon" href="tiger.gif" type="image/vnd.microsoft.icon">  
				
				<link href="esms.css" type="text/css" rel="stylesheet"/>
				
				<!-- "web widget implementation" -->	
				<script type="text/javascript">
					var PageLoader = {
						tabClass : function(a){
							var c = document.getElementById(a.getAttribute('rel'));
							c.style.display='block';
							var arrays = jQuery.find("div.pop_div");
							for(var i=0;i<arrays.length;i++){
								var array = arrays[i];
								if(array.id != (a.getAttribute('rel'))) {
									array.style.display='none';
								}
							}
						},
						load : function() {
							var selector,injector,nodes;
							for(selector in registry){
								nodes = jQuery.find(selector);  
								injector = registry[selector];	
								for(var i=0;i<nodes.length; i++){
									injector(nodes[i]);			
								}
							}
						}
					};
					var registry = {};
					registry['a.pop'] = function(aLink){
						aLink.onclick = PageLoader.tabClass.bind(PageLoader,aLink);
					};
				</script>
		</head>
		<body id="htmlbody">
		
	  			<script type="text/javascript">
	 					Yutil.useLoadingMessage();
  				</script>
		<%
				//get current user
				String userid = (String) request.getAttribute("user");
				if(null == userid) {
						out.println("Please login ESMS first.");%>
						
						<a href='/ESMS'>Login</a>
						
						<%
						//throw new UserException("Please login ESMS first.");
				}  else {
						Person person = (Person) PersonService.$.getPerson(userid);	
						String personType = PersonService.$.getPersonType(person);
						request.setAttribute("personType", personType);
		%>
				<div class="top"><h1>人事服务系统</h1>
				</div>
				<div class="top_login" id="top_login" align='right' width=100% style="border-bottom:1px dashed #B9B9B9">
						<table>
								<tr>
										<td>欢迎&nbsp;<span color='red'><font color='green'><%= session.getValue("user") %></font></span>&nbsp;登陆
												<a href='/<%= LocalContants.PROJECT_NAME %>'>注销</a>
												<a href="javascript:;" onclick="actionPage('mailbox.jsp')">收件箱</a>
										</td>
								</tr>
						</table>
				</div>
					
				<div id="mainBoard" style="height:85%; border:solid 1px #000;">
						<input type="hidden" name="left-nav-width" id="left-nav-width"/>
						<div id="left-nav" class="sidebar" align='center' style="width:10em; height:100%; float:left;">
								<%@ include file="/left.jsp" %>
						</div>
						<div id="bar_line" style="width:8px; float:left; height:100%; overflow:hidden; position:relative; cursor:w-resize; 
												  background-color:white;border:1px solid #C3D9FF;"
								title="Drag me to resize the width of left navigation bar"
								onmousedown="Ydnd.startResizingWidth(event, this)"
								onmouseover="this.style.background='#DEF'"
								onmouseout="this.style.background='white'"
								onmouseup="$('left-nav-width').value=$('left-nav').style.width;">
						</div>
						<div id="right" class="right" align='center' fitWidth='auto' style="height:100%; float:left;"
								minWidth="200">
								<!-- 
								<%@include file="/right.jsp" %>
								 -->
						</div>
				</div>
					
				<div class="footer" align='center'>
						<div class="copyright" id="copyright">&copy; 2009 <a href="index.html">企业人才服务有限公司</div>
				</div>
				
				<script type="text/javascript">
						actionPage = function(dest) {
								var url = dest;
								var myAjax = new Ajax.Updater('right',url,{method:'get',evalScripts: true});
					}
				</script> 
		<%} %>
		
		</body>
</html>

<%@ page import="com.esms.bean.Person" %>
<%@ page import="com.esms.struts.service.*" %>
<%@ page contentType="text/html;charset=utf-8"%>